g_clear_pointer (&priv->layout, gdk_toplevel_layout_unref);
priv->layout = gtk_window_compute_layout (window);
- gdk_toplevel_present (GDK_TOPLEVEL (priv->surface), priv->layout);
+ if (_gtk_widget_get_mapped (GTK_WIDGET (window)))
+ gdk_toplevel_present (GDK_TOPLEVEL (priv->surface), priv->layout);
}
}
if (configure_request_pos_changed)
g_warning ("configure request position changed. This should not happen. Ignoring the position");
- gdk_toplevel_present (GDK_TOPLEVEL (priv->surface), priv->layout);
+ if (_gtk_widget_get_mapped (widget))
+ gdk_toplevel_present (GDK_TOPLEVEL (priv->surface), priv->layout);
}
else
{
g_assert (surface != NULL);
- gtk_window_present_toplevel (window);
-
/* Translate a timestamp of GDK_CURRENT_TIME appropriately */
if (timestamp == GDK_CURRENT_TIME)
{